package com.beamfield.dao.lab;

import com.beamfield.model.LabInstrument;
import com.beamfield.model.LabInstrumentExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
public interface LabInstrumentMapper {
    int countByExample(LabInstrumentExample example);

    int deleteByPrimaryKey(Long id);

    int insert(LabInstrument record);

    int insertSelective(LabInstrument record);

    List<LabInstrument> selectByExampleWithBLOBs(LabInstrumentExample example);

    List<LabInstrument> selectByExample(LabInstrumentExample example);

    LabInstrument selectByPrimaryKey(Long id);

    List<LabInstrument> selectByBeam_id(@Param("beam_id")Long beam_id);

    LabInstrument selectByInstr_no(@Param("instr_no")String instr_no);

    int updateByPrimaryKeySelective(LabInstrument record);

    int updateByPrimaryKeyWithBLOBs(LabInstrument record);

    int updateByPrimaryKey(LabInstrument record);

    List<LabInstrument> getLabInstrumentList(@Param("offset") Integer offset, @Param("limit") Integer limit, @Param("instr_name") String instr_name, @Param("manufacturer") String manufacturer, @Param("beam_id") Long beam_id, @Param("storage_location") String storage_location);

    int countList(@Param("instr_name") String instr_name, @Param("manufacturer") String manufacturer, @Param("beam_id") Long beam_id,@Param("storage_location") String storage_location);

    List<LabInstrument> getWithMaintenance(@Param("offset")Integer offset, @Param("limit")Integer limit, @Param("instr_name")String instr_name, @Param("instr_no")String instr_no, @Param("beam_id")Long beam_id);

    int getCount(@Param("instr_name")String instr_name, @Param("instr_no")String instr_no, @Param("beam_id")Long beam_id);

}